import {List} from "antd-mobile";
import YwhtpItem from "./YwhtpItem";

export function YwhtpList(props){
  let rws = props.rws;
  let content = null;
  if (rws && rws.length > 0) {
    content = rws.map(rw => <YwhtpItem rw={rw} />);
  } else {
    content = <div style={{margin: '0 auto', lineHeight: '36px'}}>暂无投票</div>
  }

  return <List renderHeader={() => props.title} className="my-list">{content}</List>
}
